<template>
  <div class="member_content">
    <div class="header_content">
      <el-input
        v-model="listQuery.orderNo"
        clearable
        placeholder="请输入订单号"
        style="width: 200px;"
        class="filter-item"
        size="small"
        @keyup.enter.native="submit"
      />
      <el-input
        v-model="listQuery.phone"
        clearable
        placeholder="请输入订电话号码"
        style="width: 200px;"
        class="filter-item"
        size="small"
        @keyup.enter.native="submit"
      />
      <label class="form-key" style="margin-left: 20px;">订单日期：</label>
      <el-date-picker
        v-model="listQuery.startTime"
        clearable
        size="small"
        style="width:200px;"
        type="date"
        placeholder="选择日期"
      />
      <el-date-picker
        v-model="listQuery.endTime"
        clearable
        size="small"
        style="width:200px;"
        type="date"
        placeholder="选择日期"
      />
      <el-select
        v-model="listQuery.options"
        size="small"
        placeholder="请选择分类"
        clearable
        class="filter-item"
        style="width: 120px"
      >
        <el-option label="家会员" value=1 />
        <el-option label="课程" value=2 />
      </el-select>
      <el-button
        size="mini"
        class="filter-item"
        type="primary"
        icon="el-icon-search"
        style="margin-left: 20px;"
        @click="submit"
      >查询</el-button>
      <el-button
        size="mini"
        class="filter-item"
        style="margin-left: 10px;"
        type="primary"
        icon="el-icon-upload2"
        @click="handleExcelDownload"
      >导出Excel</el-button>
    </div>
    <el-table
      :key="tableKey"
      :data="memberlists"
      border
      fit
      highlight-current-row
      style="width: 100%;"
      :element-loading-text="global.loadingStr"
      :header-cell-style="{background:global.mainColor}"
    >
      <el-table-column label="订单编号" align="center">
        <template>
          <span></span>
        </template>
      </el-table-column>
      <el-table-column label="商品图" align="center">
        <template>
          <span></span>
        </template>
      </el-table-column>
      <el-table-column label="商品名称" align="center">
        <template>
          <span></span>
        </template>
      </el-table-column>
      <el-table-column label="手机号" align="center">
        <template>
          <span></span>
        </template>
      </el-table-column>
      <el-table-column label="有效期" align="center">
        <template>
          <span></span>
        </template>
      </el-table-column>
      <el-table-column label="下单时间" align="center">
        <template>
          <span></span>
        </template>
      </el-table-column>
      <el-table-column label="金额" align="center">
        <template>
          <span></span>
        </template>
      </el-table-column>
    </el-table>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="listQuery.currentPage"
      :limit.sync="listQuery.pageSize"
      @pagination="getList"
    />
  </div>
</template>

<script>
  import Pagination from '@/components/Pagination' // secondary package based on el-pagination
  export default {
    name: 'Order',
    components:{
      Pagination
    },
    data() {
      return {
        listQuery: {
          currentPage: 1,
          pageSize: 10,
          orderNo: '',
          phone: '',
          startTime: '',
          endTime: '',
          options: ''
        },
        tableKey: 0,
        memberlists:[],
        total:2
      }
    },
    created() {},
    methods: {
      getList() {},
      submit() {},
      handleExcelDownload() {}
    }
  }
</script>

<style scoped lang="scss">
.member_content{
  padding: 15px;
  .header_content{
    padding: 15px;
    width: 100%;
  }
}
</style>
